package com.zhanggm.zyk.hetong.kafka;


import lombok.extern.slf4j.Slf4j;
import org.apache.kafka.clients.consumer.ConsumerRecord;
import org.springframework.kafka.annotation.KafkaListener;
import org.springframework.kafka.support.Acknowledgment;
import org.springframework.stereotype.Component;

@Slf4j
@Component
public class HetongConsumer {

    @KafkaListener(topics = {"hetong0312"})
    public void consumer(ConsumerRecord<String, String> cr, Acknowledgment acknowledgment) {
        log.info("合同信息：{}", cr.value());
    }
}
